package com.haier.uos.weather.city.controller;

import com.haier.uos.weather.city.service.ICityDataService;
import com.haier.uos.weather.city.vo.City;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/city")
public class CityController {
    @Autowired
    private ICityDataService cityDataService;
    @GetMapping("/all")
    public List<City> getAllCity() {
        return cityDataService.getCities();
    }
}
